using System;
using ValidationFramework.Reflection;

namespace ValidationFramework
{
    public class MockInfoDescriptor : InfoDescriptor
    {
        public MockInfoDescriptor(RuntimeTypeHandle runtimeTypeHandle, string name)
            : base(runtimeTypeHandle, name)
        {
        }
        public MockInfoDescriptor() : base(default(RuntimeTypeHandle), "name")
        {
        }

    	public object value;
    	public string key;
        public override object GetValue(object target)
        {
        	return value;
        }
    }
    public class MockInfoDescriptorCollection : AutoKeyDictionary<string, MockInfoDescriptor>
    {
    	protected override string GetKeyForItem(MockInfoDescriptor item)
    	{
    		return item.key;
    	}
    }


	public class MockParameterDescriptor<T> : ParameterDescriptor
    {
        public MockParameterDescriptor(string name)
            : base(typeof(T).TypeHandle, name)
        {
        }
    }

    public class MockPropertyDescriptor<T> : PropertyDescriptor
    {
        public MockPropertyDescriptor(string name)
            : base(typeof(T).TypeHandle, name)
        {
        }
    }
    public class MockFieldDescriptor<T> : FieldDescriptor
    {
        public MockFieldDescriptor(string name)
            : base(typeof(T).TypeHandle, name)
        {
        }
    }


}
